package com.education.myoschinatest;

import android.app.Application;

import com.litesuits.orm.LiteOrm;

/**
 * Created by zhonghang on 16/8/31.
 */

public class MyApp extends Application {
    private static LiteOrm liteOrm;
    private static MyApp app;

    @Override
    public void onCreate() {
        super.onCreate();
        app = this;
        initLiteOrm();
    }

    private void initLiteOrm() {
        if (liteOrm == null) {
            liteOrm = LiteOrm.newSingleInstance(this, "liteorm.db");
        }
        liteOrm.setDebugged(true); // open the log
    }

    public static MyApp getInstance() {
        return app;
    }

    public static LiteOrm getLiteOrm() {
        return liteOrm;
    }
}
